package com.hctforgreen.greenservice.model;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Gif图片及说明文字
 * @author Tallen Zhai
 *
 */
public class LoadingInfoEntity extends BaseEntity {
	private static final long serialVersionUID = -710404169361709516L;

	/**
	 * HctConstants.RESULT_STATE_SUCCESS
	 * HctConstants.RESULT_STATE_FAILD
	 * HctConstants.RESULT_STATE_EXCEPTION
	 */
	public String statusCode = "";
	
	public String id = "";
	public String message = "";
	public final static String STATE_CODE = "statusCode";
	public final static String ID = "id";
	public final static String MESSAGE = "message";
	public static LoadingInfoEntity parse(JSONObject jsonObject)throws JSONException{
		LoadingInfoEntity bean = new LoadingInfoEntity();
		if(jsonObject.has(STATE_CODE)){
			bean.statusCode = jsonObject.getString(STATE_CODE);
		}
		if(jsonObject.has(ID)){
			bean.id = jsonObject.getString(ID);
		}
		if(jsonObject.has(MESSAGE)){
			bean.message = jsonObject.getString(MESSAGE);
		}
		return bean;
	}
}
